<?php
/**
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.cake.libs.view.templates.layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $this->Html->charset(); ?>
<title><?php echo $title_for_layout; ?> - <?php echo __('Collaborator System'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php
echo $this->Html->meta('icon');
echo $this->Html->css(array('normalize', 'bootstrap', 'bootstrap-responsive', 'jquery-ui/jquery-ui-1.8.23', 'global', 'app'));
echo $this->Html->script(array('lib/jquery.js','lib/jquery-ui.js','lib/bootstrap.js'));
echo $scripts_for_layout;
?>
<style>
  body {
    padding-top: 60px;
    padding-bottom: 40px;
  }
  </style>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
					<span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
				</a>
				<?php echo $this->Html->link('Collab' ,"/",array('class' => 'brand')) ?>
				<div class="nav-collapse">
                    <?php echo $this->element("navigation",compact('topmenuLinkActive')); ?>
                    <?php if(AuthComponent::user('id')): ?>
                    <div class="btn-group pull-right">
	                    <a href="#" data-toggle="dropdown" class="btn dropdown-toggle"> 
							<i class="icon-user"></i>
							<?php echo AuthComponent::user('username') ?>
							<span class="caret"></span>
						</a>
						<ul class="dropdown-menu">
							<li><?php 
							echo $this->Html->link(__('Profile',true), array('controller'=> 'users', 'action'=> 'profile'));
							?></li>
							<li class="divider"></li>
							<li><?php 
							echo $this->Html->link(__('Log Out',true), array('controller' => 'users', 'action' => 'logout'));
							?></li>
						</ul>
					</div>   
					<?php endif ?>
				</div><!--/.nav-collapse -->
			</div>
		</div>
	</div>
	<div class="container">
		<?php echo $this->Session->flash(); ?>
		<div class="row-fluid"><?php echo $content_for_layout; ?></div>
		<div class="clear"></div>
	</div>
	<?php //echo $this->element('sql_dump'); ?>
</body>
</html>
